package structures
{
	import flash.utils.Dictionary;
	import flash.utils.Proxy;
	import flash.utils.flash_proxy;

	public dynamic class DictionaryExt extends Proxy
	{
		use namespace flash_proxy;

		private var m_dic:Dictionary;

		public function DictionaryExt()
		{
			super();

			this.m_dic=new Dictionary;
		}

		public function clear():void
		{
			for (var key:* in m_dic)
				delete m_dic[key];
		}

		public function empty():Boolean
		{
			for each (var value:* in m_dic)
				return false;

			return true;
		}

		override flash_proxy function getProperty(name:*):*
		{
			return m_dic[name];
		}

		override flash_proxy function setProperty(name:*, value:*):void
		{
			m_dic[name]=value;
		}
	}
}
